package managers;

import java.sql.*;

public class DatabaseConnection {

	private Connection connect = null;
	
	public DatabaseConnection() throws Exception {

		try {
			Class.forName("com.mysql.jdbc.Driver");

			connect = DriverManager
					.getConnection(
							"jdbc:mysql://localhost:3306/hovedopgave?autoReconnect=true",
							"root", "root");
			System.out.println("Forbindelsen til databasen er oprettet!");
		} catch (Exception e) {
			throw e;
		} finally {

		}
	}

	public Connection getConnect() {
		return connect;
	}

}
